﻿//-----------------------------------------------------------------------
// <copyright file="AssemblyEntity.cs" company="CodePlex">
//     Copyright (c) Doug Holland, CodePlex. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace CodePlex.Diagnostics.Model
{
    using System;
    using System.Reflection;
    
    using CodePlex.Diagnostics.Contracts;

    /// <summary>
    /// Represents an assembly, which is a reusable, versionable, and self-describing building block of a common language runtime application.
    /// </summary>
    public sealed partial class AssemblyEntity
    {
        #region public AssemblyEntity()

        /// <summary>
        /// Initializes a new instance of the <see cref="T:AssemblyEntity"/> class.
        /// </summary>
        public AssemblyEntity()
        {
        }

        #endregion

        #region public AssemblyEntity(AssemblyDataContract assembly)

        /// <summary>
        /// Initializes a new instance of the <see cref="T:AssemblyEntity"/> class.
        /// </summary>
        /// <param name="contract">An instance of the <see cref="T:AssemblyDataContract"/> class to be used to construct an instance of the <see cref="T:AssemblyEntity"/> class.</param>
        public AssemblyEntity(AssemblyDataContract contract)
        {
            this.CodeBase = contract.CodeBase;

            this.DebugBuild = contract.DebugBuild;

            this.EntryPoint = contract.EntryPoint;

            this.FullName = contract.FullName;

            this.GlobalAssemblyCache = contract.GlobalAssemblyCache;

            this.HostContext = contract.HostContext;

            this.ImageRuntimeVersion = contract.ImageRuntimeVersion;

            this.Location = contract.Location;

            this.ManifestModule = contract.ManifestModule;

            this.ReflectionOnly = contract.ReflectionOnly;
        }
        
        #endregion
    }
}
